-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add event_slug_builder support to PolymarketInstrumentProvider #3501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jsemldonado
wants to merge
1
commit into
nautechsystems:develop
Choose a base branch
from
jsemldonado:feature/polymarket-event-slug-builder
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add event_slug_builder support to PolymarketInstrumentProvider #3501
jsemldonado
wants to merge
1
commit into
nautechsystems:develop
from
jsemldonado:feature/polymarket-event-slug-builder
+638
−9
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7205bb5 to
cae1f3f
Compare
cae1f3f to
ca593ff
Compare
Member
|
Hi @jsemldonado Thanks for the PR, this looks like a valuable feature and well implemented overall. I'll have capacity to review more closely next week. In the mean time, here are some minor items worth considering: Also, it would be ideal to add some additional test coverage (just the high-value tests listed in "missing coverage"): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
NautilusTrader prioritizes correctness and reliability, please follow existing patterns for validation and testing.
CONTRIBUTING.mdand followed the established practicesSummary
Add
event_slug_buildersupport toPolymarketInstrumentProvider, enabling efficient loading of niche, reoccurring/related prediction markets (e.g., up or down crypto markets, weather markets) by dynamically generating event slugs instead of downloading all 151k+ markets.Related Issues/PRs
N/A
Type of change
Breaking change details (if applicable)
N/A
Documentation
docs/developer_guide/docs.md)Release notes
RELEASES.mdthat follows the existing conventions (when applicable)Testing
Ensure new or changed logic is covered by tests.
Added 6 test cases in
tests/integration_tests/adapters/polymarket/test_providers.py:test_load_all_async_uses_event_slug_builder_when_configuredtest_event_slug_builder_takes_priority_over_gamma_marketstest_event_slug_builder_handles_multiple_slugstest_event_slug_builder_handles_empty_slug_listtest_event_slug_builder_continues_on_event_not_foundtest_event_slug_builder_skips_markets_without_condition_idAdded example scripts in
examples/live/polymarket/:slug_builders.py- Example slug builder functions for BTC/ETH/crypto 15-minute UpDown marketspolymarket_slug_builder_tester.py- TradingNode example demonstrating the featureRun with: